var status = -1;
var selectionLog = [];

function action(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.afterlandUpdateEnvironment();
            if (cm.isQuestActive(63031)) {
                cm.playerMessage(5, "远处能看见有一只戴着闪亮项链的蝙蝠怪。");
                cm.addPopupSay(9400205, 4000, "那边好像见到一只戴着闪亮项链的蝙蝠怪呢？！", "", 0);
                cm.spawnMobLimit(9402055, 1, -180, -207, 1)
            }
            cm.dispose()
        }
    }
}

function start() {
    status = -1;
    action(1, 0, 0)
};